package cn.muqingfeng.api;

import android.net.Uri;

public class UriHelper {
	public static final String PARAMS_USERNAME = "username";

	public static final String PARAMS_PASSWORD = "password";

	public static final String PARAMS_PASSWORD2 = "password2";

	public static final String PARAMS_OLD_PASSWORD = "oldpassword";

	public static final String PARAMS_NEW_PASSWORD = "newpassword";

	public static final String PARAMS_NEW_PASSWORD2 = "newpassword2";

	public static final String PARAMS_SUBJECT = "subject";

	public static final String PARAMS_MESSAGE = "message";

	public static final String PARAMS_EMAIL = "email";

	public static final String PARAMS_HEADER_USERNAME = "user";

	public static final String PARAMS_HEADER_PASSWORD = "pass";

	public static final String PARAMS_FID = "fid";

	public static final String PARAMS_TID = "tid";

	public static final String PARAMS_PAGE_SIZE = "tpp";

	public static final String PARAMS_PAGE_SIZE2 = "perpage";

	public static final String PARAMS_PAGE_SIZE_1 = "ppp";

	public static final String PARAMS_PAGE_NO = "page";
	
	public static final String PARAMS_LOADS = "loads";

	public static final String getLoginUrl() {
		return Api.LOGIN_URL;
	}

	public static final String gerFindPasswordUrl() {
		return Api.FIND_PASSWORD_URL;
	}

	public static final String getRegistUrl() {
		return Api.REGIST_URL;
	}

	public static final String getChangePasswordUrl() {
		return Api.CHANGE_PASSWORD;
	}

	public static final String getArticlesUrl(long fid) {
		Uri.Builder builder = Uri.parse(Api.ARTICLES_URL).buildUpon();
		if (fid > 0) {
			builder.appendQueryParameter(PARAMS_FID, String.valueOf(fid));
		}
		return builder.toString();
	}

	public static final String getAllArticlesUrl() {
		return Api.ARTICLES_ALL_URL;
	}

	public static final String getChangeAvatarUrl() {
		return Api.CHANGE_AVATAR_URL;
	}

	public static final String getAvatarUrl(String fid) {
		return String.format(Api.AVATAR_URL, fid);
	}

	public static final String getArticleDetailUrl() {
		return Api.ARTICLE_DETAIL_URL;
	}

	public static final String getSendArticleUrl(int fid) {
		return String.format(Api.SEND_ARTICLE_URL,fid);
	}

	public static final String getMyArticleUrl() {
		return Api.MY_ARTICLE_URL;
	}

	public static final String getAddFavArticleUrl() {
		return Api.ADD_FAV_URL;
	}

	public static final String getRemoveFavArticleUrl() {
		return Api.REGIST_URL;
	}

	public static final String getMyFavArticleUrl() {
		return Api.MY_FAV_ARTICLE_URL;
	}

	public static final String getWebDetailUrl(String tid) {
		return String.format(Api.WEB_DETAIL_URL, tid);
	}

	public static final String getReplyArticleUrl() {
		return Api.REPLY_ARTICLE_URL;
	}
}
